package org.xq.shop.maxaishop.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xq.shop.maxaishop.entity.XqRole;
import org.xq.shop.maxaishop.service.XqRoleService;

import javax.annotation.Resource;

/**
 * 角色表(XqRole)表控制层
 *
 * @author admin
 * @since 2021-06-16 00:30:06
 */
@Api( tags = "角色管理")
@RestController
@RequestMapping("xqRole")
public class XqRoleController {
    /**
     * 服务对象
     */
    @Resource
    private XqRoleService xqRoleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation("根据主键查询单个系统用户")
    @ApiImplicitParam(name = "id", value = "用户ID", required=true,paramType="query" )
    @GetMapping("selectOne")
    public XqRole selectOne(Integer id) {
        return this.xqRoleService.queryById(id);
    }

}